home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1997
/
MacHack 1997.toast
/
Hacks
/
Hacks ’96
/
Better AD security
/
Source
/
AfterDarkGestalt.h
next >
Wrap
Text File
|
1996-06-21
|
2KB
|
73 lines
/*
AfterDarkGestalt.h
All Gestalt selectors that are defined by After Dark.
Copyright © 1990, 91-94 Berkeley Systems, Inc.
<revision history>
05/16/94 smz cleaned up for more public release
*/
#ifndef __AFTER_DARK_GESTALT__
#define __AFTER_DARK_GESTALT__
/* generic screen saver selectors. */
#define gestaltScreenSaverAttr 'SAVR' /* defined if a screen saver is installed. */
/* Gestalt called with 'SAVR' selector returns longword bitmask. Here are the bit numbers: */
enum {
gestaltSaverTurnedOn = 0, /* saver enabled/disabled. */
gestaltSaverAsleep, /* saver currently asleep. */
gestaltSaverDemoMode, /* saver sleeping in demo mode. */
gestaltSaverPasswordMode, /* saver sleeping in password-protected mode. */
gestaltAppDrawingDisabled /* Quickdraw drawing disallowed between module animation frames. */
};
#define gestaltScreenSaverControl 'SAVC' /* allows controlling screen saver. */
/* Gestalt called with 'SAVC' selector returns a pointer to a procedure with the following calling conventions: */
enum SaverCommand {
gestaltSaverWakeUp,
gestaltSaverSleep,
/* defined in AD 2.0x and later */
gestaltSaverOn,
gestaltSaverOff,
/* defined for AD 3.0 and later */
gestaltSysIQOn,
gestaltSysIQOff,
gestaltForceShort = 257
};
//typedef short SaverCommand; /* passes as a short, not a byte */
/*
This function, called with parameter eSaverWakeUp, causes the screen saver to wake
up at the next opportunity; called with parameter eSaverSleep, causes the saver
to sleep at the next opportunity. The function returns an error if the action
is impossible for some reason.
*/
typedef pascal OSErr (*SaverControlProcPtr) (SaverCommand command); /* pascal conventions! */
/* After Dark specific selectors. */
/* This Gestalt selector returns a longword bitmask containing public information about After Dark. */
#define gestaltAfterDarkAttr 'ADrk' /* After Dark states. */
enum {
gestaltSystemIQActive = 0, /* SystemIQ™ activity monitor active. */
gestaltSoundActive /* After Dark has allocated a sound channel. */
};
/* private After Dark selectors. */
typedef pascal short (*GetADFolderProcPtr)(short* vRefNum, long* dirID);
#define gestaltAfterDarkGlobals 'aYmm' /* get After Dark globals. */
#define gestaltAfterDarkExtensions 'ADex' /* get After Dark extensions. */
#define gestaltAfterDarkFilesFoler 'ADfd' /* get GetADFolderProcPtr */
#endif